package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 书籍收藏表(BookFavorites)实体类
 *
 * @author 杨丽辉
 * @since 2021-03-10 14:58:55
 */
@ApiModel("书籍收藏表")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class BookFavorites implements Serializable {
    private static final long serialVersionUID = 907410600884713778L;
        /**
    *主键
    * 主表id
    * isnull 1
    */
    @ApiModelProperty(value="主表id", position=1)
    @TableId(type = IdType.ASSIGN_ID)
    private String bookFavoritesId;

    /**
    * 书籍id
    * isnull 0
    */        @ApiModelProperty(value="书籍id",position=2)
    private String bookId;
    /**
    * 书籍名称
    * isnull 0
    */        @ApiModelProperty(value="书籍名称",position=3)
    private String bookname;
    /**
    * 收藏者id
    * isnull 0
    */        @ApiModelProperty(value="收藏者id",position=4)
    private String userId;
    /**
    * 用户昵称
    * isnull 0
    */        @ApiModelProperty(value="用户昵称",position=5)
    private String userName;
    /**
    * 用户头像
    * isnull 0
    */        @ApiModelProperty(value="用户头像",position=6)
    private String userImg;
    /**
    * 收藏时间
    * isnull 0
    */        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty(value="收藏时间",position=7)
    private LocalDateTime favoritesTime;
        
    public String getBookFavoritesId() {
        return bookFavoritesId;
    }

    public void setBookFavoritesId(String bookFavoritesId) {
        this.bookFavoritesId = bookFavoritesId;
    }
        
    public String getBookId() {
        return bookId;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId;
    }
        
    public String getBookname() {
        return bookname;
    }

    public void setBookname(String bookname) {
        this.bookname = bookname;
    }
        
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }
        
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
        
    public String getUserImg() {
        return userImg;
    }

    public void setUserImg(String userImg) {
        this.userImg = userImg;
    }
        
    public LocalDateTime getFavoritesTime() {
        return favoritesTime;
    }

    public void setFavoritesTime(LocalDateTime favoritesTime) {
        this.favoritesTime = favoritesTime;
    }

        @Override
    public String toString() {
        return "{" +
                    " \"bookFavoritesId\":" + bookFavoritesId +
                                  " ,\"bookId\":" + bookId +
                            " ,\"bookname\":" + bookname +
                            " ,\"userId\":" + userId +
                            " ,\"userName\":" + userName +
                            " ,\"userImg\":" + userImg +
                            " ,\"favoritesTime\":" + favoritesTime +
                  '}';
    }


}
